]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm: Override any other lower-priority service message on error
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Tue, 16 Feb 2021 02:56:09 +0000 (03:56 +0100)
committerRay Strode <halfline@gmail.com>
Tue, 16 Feb 2021 18:00:10 +0000 (18:00 +0000)
When we got an error, all the other HINT or INFO messages are not useful
anymore and delaying to show them is just a waste of time and may be
even wrong in scenarios with fast authentication devices.

An example are the fingerprint devices, where the user may touch the
sensor repeatedly while we may still show the "touch the sensor" hint
instead of notifying of possible errors.

So, in case we got an error override all the other errors coming from
the same service with lower priority.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1683>

js/gdm/util.js

index f1c3c914975bcfc6b592fd31e250d6591b2ca492..1ee84acde287a233b098dbd01f8f34ac076a3507 100644 (file)
@@ -603,7 +603,8 @@ var ShellUserVerifier = class {
         if (!this.serviceIsForeground(serviceName) && !isFingerprint)
             return;
 
-        this._queueMessage(serviceName, problem, MessageType.ERROR);
+        this._queuePriorityMessage(serviceName, problem, MessageType.ERROR);
+
         if (isFingerprint) {
             // pam_fprintd allows the user to retry multiple (maybe even infinite!
             // times before failing the authentication conversation.